def main():
    a=int(input())
    n=int(input())
    s=0
    while n>0:
        i=n
        m=0
        while i>0:  
            m=m*10+a
            i-=1
        s+=m       
        n-=1
    print(s)
main()